How to convert your raw grade (as % of possible score) to a letter grade:
below 33.3% = F
above 33.3% = D
above 50.0% = C
above 62.5% = C+
above 66.6% = B-
above 70.8% = B
above 79.1% = B+
above 83.3% = A-
above 87.5% = A
above 95.8% = A+
Below you will find statistics on each homework assignement.
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
# set plot size
plt.rcParams['figure.figsize'] = (10.0, 9.0)
# Hunter college grading scale
hunter_scale = [0.0, 0.6, 0.7, 0.775, 0.8, 0.825, 0.875, 0.9, 0.925, 0.975, 1.0]
# associated letter grades
letter_scale = ['F','D','C','C+','B-','B','B+','A-','A','A+']
# conversion from raw score % to Hunter scale
def convert_to_hunter_scale(raw_grades): return [3.0*g/5.0 + 0.4 for g in raw_grades]
def convert_to_raw_scale(hunter_grades): return [(g-0.4)*5.0/3.0 for g in hunter_grades]
raw_scale = convert_to_raw_scale(hunter_scale)
print raw_scale
# Homework 1 statistics
HW1_class_average_raw = 0.605
HW1_class_median_raw = 0.583
HW1_class_average_conv = 0.764
HW1_class_median_conv = 0.75
# ['F','D','C','C+','B-','B','B+','A-','A','A+']
HW1_grade_counts = [1,3,4,1,2,0,2,1,0,1]
plt.grid(True)
plt.bar(range(len(letter_scale)), HW1_grade_counts, align='center')
plt.xticks(range(len(letter_scale)), letter_scale, rotation='horizontal')
plt.xlim(-0.5,9.5)
plt.show()
# Homework 2 statistics
HW2_class_average_raw = 0.746
HW2_class_median_raw = 0.733
HW2_class_average_conv = 0.848
HW2_class_median_conv = 0.840
# ['F','D','C','C+','B-','B','B+','A-','A','A+']
HW2_grade_counts = [0,1,2,1,2,1,2,2,4,1]
plt.grid(True)
plt.bar(range(len(letter_scale)), HW2_grade_counts, align='center')
plt.xticks(range(len(letter_scale)), letter_scale, rotation='horizontal')
plt.xlim(-0.5,9.5)
plt.show()